total_memory : 6141
free_memory : 4274
free_cpus : 0
+ outstanding_claims : 0
xen_major : 4
xen_minor : 2
xen_extra : -unstable
Available memory (in MB) not allocated to Xen, or any other domains.
+=item B<outstanding_claims>
+
+When a claim call is done (see L<xl.conf>) a reservation for a specific
+amount of pages is set and also a global value is incremented. This
+global value (outstanding_claims) is then reduced as the domain's memory
+is populated and eventually reaches zero. Most of the time the value will
+be zero, but if you are launching multiple guests, and B<claim_mode> is
+enabled, this value can increase/decrease.
+
=item B<xen_caps>
The Xen version and architecture. Architecture values can be one of:
return ret;
}
+uint64_t libxl_get_claiminfo(libxl_ctx *ctx)
+{
+ long l;
+
+ l = xc_domain_get_outstanding_pages(ctx->xch);
+ if (l < 0) {
+ LIBXL__LOG_ERRNOVAL(ctx, LIBXL__LOG_WARNING, l,
+ "xc_domain_get_outstanding_pages failed.");
+ return ERROR_FAIL;
+ }
+ /* In MB */
+ return (l >> 8);
+}
+
const libxl_version_info* libxl_get_version_info(libxl_ctx *ctx)
{
union {
/* wait for the memory target of a domain to be reached */
int libxl_wait_for_memory_target(libxl_ctx *ctx, uint32_t domid, int wait_secs);
+uint64_t libxl_get_claiminfo(libxl_ctx *ctx);
int libxl_vncviewer_exec(libxl_ctx *ctx, uint32_t domid, int autopass);
int libxl_console_exec(libxl_ctx *ctx, uint32_t domid, int cons_num, libxl_console_type type);
/* libxl_primary_console_exec finds the domid and console number
return;
}
+static void output_claim(void)
+{
+ long l;
+
+ /*
+ * Note that the xl.c (which calls us) has already read from the
+ * global configuration the 'claim_mode' value.
+ */
+ if (!libxl_defbool_val(claim_mode))
+ return;
+
+ l = libxl_get_claiminfo(ctx);
+ if (l < 0) {
+ fprintf(stderr, "libxl_get_claiminfo failed. errno: %d (%s)\n",
+ errno, strerror(errno));
+ return;
+ }
+
+ printf("outstanding_claims : %ld\n", l);
+
+ return;
+}
+
static void print_info(int numa)
{
output_nodeinfo();
output_topologyinfo();
output_numainfo();
}
+ output_claim();
output_xeninfo();